const fs = require('fs');

fs.readFile('JIAOXING.LIB', (err, data) => {
    if (err) throw err;
    let buf = new Buffer(data);
    let phone = toNumber(buf.slice(80, 84), 0, 4);
    console.log(phone);

    let time = buf.slice(85, 90);
    console.log(time);
    console.log(new Buffer(time,"utf-8").toString());
});

function toNumber(arr, start, end) {
    let ret = 0;
    var done = start + end;
    for (let i = 0; i < done; i++) {
        ret = (ret << 8 & -1) + (arr[done - i - 1] & 0xff);
    }
    return ret;
}